3.309 \(\int (g+h x)^2 (A+B \log (e (a+b x)^n (c+d x)^{-n}))^3 \, dx\)

Optimal. Leaf size=875 \[ -\frac {B^3 h^2 n^3 \log (c+d x) (b c-a d)^3}{b^3 d^3}-\frac {B^2 h^2 n^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) (b c-a d)^3}{b^3 d^3}+\frac {B^3 h^2 n^3 \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right ) (b c-a d)^3}{b^3 d^3}+\frac {B^2 h^2 n^2 (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) (b c-a d)^2}{b^3 d^2}-\frac {2 B^2 h (3 b d g-2 b c h-a d h) n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) (b c-a d)^2}{b^3 d^3}-\frac {2 B^3 h (3 b d g-2 b c h-a d h) n^3 \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right ) (b c-a d)^2}{b^3 d^3}-\frac {B h^2 n (c+d x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2 (b c-a d)}{2 b d^3}-\frac {B h (3 b d g-2 b c h-a d h) n (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2 (b c-a d)}{b^3 d^2}+\frac {B \left (\left (3 d^2 g^2-3 c d h g+c^2 h^2\right ) b^2-a d h (3 d g-c h) b+a^2 d^2 h^2\right ) n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2 (b c-a d)}{b^3 d^3}+\frac {2 B^2 \left (\left (3 d^2 g^2-3 c d h g+c^2 h^2\right ) b^2-a d h (3 d g-c h) b+a^2 d^2 h^2\right ) n^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right ) (b c-a d)}{b^3 d^3}-\frac {2 B^3 \left (\left (3 d^2 g^2-3 c d h g+c^2 h^2\right ) b^2-a d h (3 d g-c h) b+a^2 d^2 h^2\right ) n^3 \text {Li}_3\left (\frac {d (a+b x)}{b (c+d x)}\right ) (b c-a d)}{b^3 d^3}-\frac {(b g-a h)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3}{3 b^3 h}+\frac {(g+h x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3}{3 h} \]

[Out]

-B^3*(-a*d+b*c)^3*h^2*n^3*ln(d*x+c)/b^3/d^3+B^2*(-a*d+b*c)^2*h^2*n^2*(b*x+a)*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))
/b^3/d^2-2*B^2*(-a*d+b*c)^2*h*(-a*d*h-2*b*c*h+3*b*d*g)*n^2*ln((-a*d+b*c)/b/(d*x+c))*(A+B*ln(e*(b*x+a)^n/((d*x+
c)^n)))/b^3/d^3-B*(-a*d+b*c)*h*(-a*d*h-2*b*c*h+3*b*d*g)*n*(b*x+a)*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^2/b^3/d^2-
1/2*B*(-a*d+b*c)*h^2*n*(d*x+c)^2*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^2/b/d^3+B*(-a*d+b*c)*(a^2*d^2*h^2-a*b*d*h*(
-c*h+3*d*g)+b^2*(c^2*h^2-3*c*d*g*h+3*d^2*g^2))*n*ln((-a*d+b*c)/b/(d*x+c))*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^2/
b^3/d^3-1/3*(-a*h+b*g)^3*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^3/b^3/h+1/3*(h*x+g)^3*(A+B*ln(e*(b*x+a)^n/((d*x+c)^
n)))^3/h-B^2*(-a*d+b*c)^3*h^2*n^2*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))*ln(1-b*(d*x+c)/d/(b*x+a))/b^3/d^3-2*B^3*(-
a*d+b*c)^2*h*(-a*d*h-2*b*c*h+3*b*d*g)*n^3*polylog(2,d*(b*x+a)/b/(d*x+c))/b^3/d^3+2*B^2*(-a*d+b*c)*(a^2*d^2*h^2
-a*b*d*h*(-c*h+3*d*g)+b^2*(c^2*h^2-3*c*d*g*h+3*d^2*g^2))*n^2*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))*polylog(2,d*(b*
x+a)/b/(d*x+c))/b^3/d^3+B^3*(-a*d+b*c)^3*h^2*n^3*polylog(2,b*(d*x+c)/d/(b*x+a))/b^3/d^3-2*B^3*(-a*d+b*c)*(a^2*
d^2*h^2-a*b*d*h*(-c*h+3*d*g)+b^2*(c^2*h^2-3*c*d*g*h+3*d^2*g^2))*n^3*polylog(3,d*(b*x+a)/b/(d*x+c))/b^3/d^3

________________________________________________________________________________________

Rubi [A]  time = 3.48, antiderivative size = 1640, normalized size of antiderivative = 1.87, number of steps used = 53, number of rules used = 13, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.394, Rules used = {6742, 2492, 72, 2514, 2486, 31, 2488, 2411, 2343, 2333, 2315, 2506, 6610} \[ \text {result too large to display} \]

Antiderivative was successfully verified.

[In]

Int[(g + h*x)^2*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^3,x]

[Out]

-((A^2*B*(b*c - a*d)*h*(3*b*d*g - b*c*h - a*d*h)*n*x)/(b^2*d^2)) + (A*B^2*(b*c - a*d)^2*h^2*n^2*x)/(b^2*d^2) -
 (A^2*B*(b*c - a*d)*h^2*n*x^2)/(2*b*d) + (A^3*(g + h*x)^3)/(3*h) - (A^2*B*(b*g - a*h)^3*n*Log[a + b*x])/(b^3*h
) + (a^2*A*B^2*(b*c - a*d)*h^2*n^2*Log[a + b*x])/(b^3*d) + (A^2*B*(d*g - c*h)^3*n*Log[c + d*x])/(d^3*h) - (A*B
^2*c^2*(b*c - a*d)*h^2*n^2*Log[c + d*x])/(b*d^3) + (2*A*B^2*(b*c - a*d)^2*h*(3*b*d*g - b*c*h - a*d*h)*n^2*Log[
c + d*x])/(b^3*d^3) - (B^3*(b*c - a*d)^3*h^2*n^3*Log[c + d*x])/(b^3*d^3) - (A*B^2*(b*c - a*d)*h^2*n*x^2*Log[(e
*(a + b*x)^n)/(c + d*x)^n])/(b*d) - (2*A*B^2*(b*c - a*d)*h*(3*b*d*g - b*c*h - a*d*h)*n*(a + b*x)*Log[(e*(a + b
*x)^n)/(c + d*x)^n])/(b^3*d^2) + (B^3*(b*c - a*d)^2*h^2*n^2*(a + b*x)*Log[(e*(a + b*x)^n)/(c + d*x)^n])/(b^3*d
^2) + (A^2*B*(g + h*x)^3*Log[(e*(a + b*x)^n)/(c + d*x)^n])/h + (2*A*B^2*(b*g - a*h)^3*n*Log[-((b*c - a*d)/(d*(
a + b*x)))]*Log[(e*(a + b*x)^n)/(c + d*x)^n])/(b^3*h) - (a^2*B^3*(b*c - a*d)*h^2*n^2*Log[-((b*c - a*d)/(d*(a +
 b*x)))]*Log[(e*(a + b*x)^n)/(c + d*x)^n])/(b^3*d) - (2*A*B^2*(d*g - c*h)^3*n*Log[(b*c - a*d)/(b*(c + d*x))]*L
og[(e*(a + b*x)^n)/(c + d*x)^n])/(d^3*h) + (B^3*c^2*(b*c - a*d)*h^2*n^2*Log[(b*c - a*d)/(b*(c + d*x))]*Log[(e*
(a + b*x)^n)/(c + d*x)^n])/(b*d^3) - (2*B^3*(b*c - a*d)^2*h*(3*b*d*g - b*c*h - a*d*h)*n^2*Log[(b*c - a*d)/(b*(
c + d*x))]*Log[(e*(a + b*x)^n)/(c + d*x)^n])/(b^3*d^3) - (B^3*(b*c - a*d)*h^2*n*x^2*Log[(e*(a + b*x)^n)/(c + d
*x)^n]^2)/(2*b*d) - (B^3*(b*c - a*d)*h*(3*b*d*g - b*c*h - a*d*h)*n*(a + b*x)*Log[(e*(a + b*x)^n)/(c + d*x)^n]^
2)/(b^3*d^2) + (A*B^2*(g + h*x)^3*Log[(e*(a + b*x)^n)/(c + d*x)^n]^2)/h + (B^3*(b*g - a*h)^3*n*Log[-((b*c - a*
d)/(d*(a + b*x)))]*Log[(e*(a + b*x)^n)/(c + d*x)^n]^2)/(b^3*h) - (B^3*(d*g - c*h)^3*n*Log[(b*c - a*d)/(b*(c +
d*x))]*Log[(e*(a + b*x)^n)/(c + d*x)^n]^2)/(d^3*h) + (B^3*(g + h*x)^3*Log[(e*(a + b*x)^n)/(c + d*x)^n]^3)/(3*h
) - (2*A*B^2*(d*g - c*h)^3*n^2*PolyLog[2, (d*(a + b*x))/(b*(c + d*x))])/(d^3*h) + (B^3*c^2*(b*c - a*d)*h^2*n^3
*PolyLog[2, (d*(a + b*x))/(b*(c + d*x))])/(b*d^3) - (2*B^3*(b*c - a*d)^2*h*(3*b*d*g - b*c*h - a*d*h)*n^3*PolyL
og[2, (d*(a + b*x))/(b*(c + d*x))])/(b^3*d^3) - (2*A*B^2*(b*g - a*h)^3*n^2*PolyLog[2, 1 + (b*c - a*d)/(d*(a +
b*x))])/(b^3*h) + (a^2*B^3*(b*c - a*d)*h^2*n^3*PolyLog[2, 1 + (b*c - a*d)/(d*(a + b*x))])/(b^3*d) - (2*B^3*(b*
g - a*h)^3*n^2*Log[(e*(a + b*x)^n)/(c + d*x)^n]*PolyLog[2, 1 + (b*c - a*d)/(d*(a + b*x))])/(b^3*h) - (2*B^3*(d
*g - c*h)^3*n^2*Log[(e*(a + b*x)^n)/(c + d*x)^n]*PolyLog[2, 1 - (b*c - a*d)/(b*(c + d*x))])/(d^3*h) - (2*B^3*(
b*g - a*h)^3*n^3*PolyLog[3, 1 + (b*c - a*d)/(d*(a + b*x))])/(b^3*h) + (2*B^3*(d*g - c*h)^3*n^3*PolyLog[3, 1 -
(b*c - a*d)/(b*(c + d*x))])/(d^3*h)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)/(x_))^(q_.)*(x_)^(m_.), x_Symbol] :> Int[(e + d*
x)^q*(a + b*Log[c*x^n])^p, x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && EqQ[m, q] && IntegerQ[q]

Rule 2343

Int[((a_.) + Log[(c_.)*(x_)^(n_)]*(b_.))/((x_)*((d_) + (e_.)*(x_)^(r_.))), x_Symbol] :> Dist[1/n, Subst[Int[(a
 + b*Log[c*x])/(x*(d + e*x^(r/n))), x], x, x^n], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IntegerQ[r/n]

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2486

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.), x_Symbol] :> Simp[((
a + b*x)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/b, x] + Dist[(q*r*s*(b*c - a*d))/b, Int[Log[e*(f*(a + b*x)^p*
(c + d*x)^q)^r]^(s - 1)/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, f, p, q, r, s}, x] && NeQ[b*c - a*d, 0] &&
EqQ[p + q, 0] && IGtQ[s, 0]

Rule 2488

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.)/((g_.) + (h_.)*(x_)),
 x_Symbol] :> -Simp[(Log[-((b*c - a*d)/(d*(a + b*x)))]*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/h, x] + Dist[(p
*r*s*(b*c - a*d))/h, Int[(Log[-((b*c - a*d)/(d*(a + b*x)))]*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1))/((a
+ b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, h, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && EqQ[p + q,
 0] && EqQ[b*g - a*h, 0] && IGtQ[s, 0]

Rule 2492

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.)*((g_.) + (h_.)*(x_))^
(m_.), x_Symbol] :> Simp[((g + h*x)^(m + 1)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/(h*(m + 1)), x] - Dist[(p*
r*s*(b*c - a*d))/(h*(m + 1)), Int[((g + h*x)^(m + 1)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1))/((a + b*x)*
(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && EqQ[p + q, 0]
&& IGtQ[s, 0] && NeQ[m, -1]

Rule 2506

Int[Log[v_]*Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.)*(u_), x_Symbo
l] :> With[{g = Simplify[((v - 1)*(c + d*x))/(a + b*x)], h = Simplify[u*(a + b*x)*(c + d*x)]}, -Simp[(h*PolyLo
g[2, 1 - v]*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/(b*c - a*d), x] + Dist[h*p*r*s, Int[(PolyLog[2, 1 - v]*Log
[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1))/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{g, h}, x]] /; FreeQ[{a, b,
c, d, e, f, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && IGtQ[s, 0] && EqQ[p + q, 0]

Rule 2514

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.)*(RFx_), x_Symbol] :>
With[{u = ExpandIntegrand[Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a,
 b, c, d, e, f, p, q, r, s}, x] && RationalFunctionQ[RFx, x] && IGtQ[s, 0]

Rule 6610

Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /
;  !FalseQ[w]] /; FreeQ[n, x]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int (g+h x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3 \, dx &=\int \left (A^3 (g+h x)^2+3 A^2 B (g+h x)^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )+3 A B^2 (g+h x)^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )+B^3 (g+h x)^2 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx\\ &=\frac {A^3 (g+h x)^3}{3 h}+\left (3 A^2 B\right ) \int (g+h x)^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx+\left (3 A B^2\right ) \int (g+h x)^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx+B^3 \int (g+h x)^2 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx\\ &=\frac {A^3 (g+h x)^3}{3 h}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}-\frac {\left (A^2 B (b c-a d) n\right ) \int \frac {(g+h x)^3}{(a+b x) (c+d x)} \, dx}{h}-\frac {\left (2 A B^2 (b c-a d) n\right ) \int \frac {(g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx}{h}-\frac {\left (B^3 (b c-a d) n\right ) \int \frac {(g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx}{h}\\ &=\frac {A^3 (g+h x)^3}{3 h}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}-\frac {\left (A^2 B (b c-a d) n\right ) \int \left (\frac {h^2 (3 b d g-b c h-a d h)}{b^2 d^2}+\frac {h^3 x}{b d}+\frac {(b g-a h)^3}{b^2 (b c-a d) (a+b x)}+\frac {(d g-c h)^3}{d^2 (-b c+a d) (c+d x)}\right ) \, dx}{h}-\frac {\left (2 A B^2 (b c-a d) n\right ) \int \left (\frac {h^2 (3 b d g-b c h-a d h) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^2 d^2}+\frac {h^3 x \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}+\frac {(b g-a h)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^2 (b c-a d) (a+b x)}+\frac {(d g-c h)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{d^2 (-b c+a d) (c+d x)}\right ) \, dx}{h}-\frac {\left (B^3 (b c-a d) n\right ) \int \left (\frac {h^2 (3 b d g-b c h-a d h) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^2 d^2}+\frac {h^3 x \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}+\frac {(b g-a h)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^2 (b c-a d) (a+b x)}+\frac {(d g-c h)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{d^2 (-b c+a d) (c+d x)}\right ) \, dx}{h}\\ &=-\frac {A^2 B (b c-a d) h (3 b d g-b c h-a d h) n x}{b^2 d^2}-\frac {A^2 B (b c-a d) h^2 n x^2}{2 b d}+\frac {A^3 (g+h x)^3}{3 h}-\frac {A^2 B (b g-a h)^3 n \log (a+b x)}{b^3 h}+\frac {A^2 B (d g-c h)^3 n \log (c+d x)}{d^3 h}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}-\frac {\left (2 A B^2 (b c-a d) h^2 n\right ) \int x \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx}{b d}-\frac {\left (B^3 (b c-a d) h^2 n\right ) \int x \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx}{b d}-\frac {\left (2 A B^2 (b g-a h)^3 n\right ) \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{a+b x} \, dx}{b^2 h}-\frac {\left (B^3 (b g-a h)^3 n\right ) \int \frac {\log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{a+b x} \, dx}{b^2 h}+\frac {\left (2 A B^2 (d g-c h)^3 n\right ) \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{c+d x} \, dx}{d^2 h}+\frac {\left (B^3 (d g-c h)^3 n\right ) \int \frac {\log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{c+d x} \, dx}{d^2 h}-\frac {\left (2 A B^2 (b c-a d) h (3 b d g-b c h-a d h) n\right ) \int \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx}{b^2 d^2}-\frac {\left (B^3 (b c-a d) h (3 b d g-b c h-a d h) n\right ) \int \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx}{b^2 d^2}\\ &=-\frac {A^2 B (b c-a d) h (3 b d g-b c h-a d h) n x}{b^2 d^2}-\frac {A^2 B (b c-a d) h^2 n x^2}{2 b d}+\frac {A^3 (g+h x)^3}{3 h}-\frac {A^2 B (b g-a h)^3 n \log (a+b x)}{b^3 h}+\frac {A^2 B (d g-c h)^3 n \log (c+d x)}{d^3 h}-\frac {A B^2 (b c-a d) h^2 n x^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}-\frac {2 A B^2 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {2 A B^2 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {2 A B^2 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}-\frac {B^3 (b c-a d) h^2 n x^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b d}-\frac {B^3 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {B^3 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}+\frac {\left (A B^2 (b c-a d)^2 h^2 n^2\right ) \int \frac {x^2}{(a+b x) (c+d x)} \, dx}{b d}+\frac {\left (B^3 (b c-a d)^2 h^2 n^2\right ) \int \frac {x^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx}{b d}-\frac {\left (2 A B^2 (b c-a d) (b g-a h)^3 n^2\right ) \int \frac {\log \left (-\frac {b c-a d}{d (a+b x)}\right )}{(a+b x) (c+d x)} \, dx}{b^3 h}-\frac {\left (2 B^3 (b c-a d) (b g-a h)^3 n^2\right ) \int \frac {\log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx}{b^3 h}+\frac {\left (2 A B^2 (b c-a d) (d g-c h)^3 n^2\right ) \int \frac {\log \left (-\frac {-b c+a d}{b (c+d x)}\right )}{(a+b x) (c+d x)} \, dx}{d^3 h}+\frac {\left (2 B^3 (b c-a d) (d g-c h)^3 n^2\right ) \int \frac {\log \left (-\frac {-b c+a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx}{d^3 h}+\frac {\left (2 A B^2 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2\right ) \int \frac {1}{c+d x} \, dx}{b^3 d^2}+\frac {\left (2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2\right ) \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{c+d x} \, dx}{b^3 d^2}\\ &=-\frac {A^2 B (b c-a d) h (3 b d g-b c h-a d h) n x}{b^2 d^2}-\frac {A^2 B (b c-a d) h^2 n x^2}{2 b d}+\frac {A^3 (g+h x)^3}{3 h}-\frac {A^2 B (b g-a h)^3 n \log (a+b x)}{b^3 h}+\frac {A^2 B (d g-c h)^3 n \log (c+d x)}{d^3 h}+\frac {2 A B^2 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log (c+d x)}{b^3 d^3}-\frac {A B^2 (b c-a d) h^2 n x^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}-\frac {2 A B^2 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {2 A B^2 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {2 A B^2 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}-\frac {2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^3}-\frac {B^3 (b c-a d) h^2 n x^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b d}-\frac {B^3 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {B^3 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}-\frac {2 B^3 (b g-a h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}-\frac {2 B^3 (d g-c h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}+\frac {\left (A B^2 (b c-a d)^2 h^2 n^2\right ) \int \left (\frac {1}{b d}+\frac {a^2}{b (b c-a d) (a+b x)}+\frac {c^2}{d (-b c+a d) (c+d x)}\right ) \, dx}{b d}+\frac {\left (B^3 (b c-a d)^2 h^2 n^2\right ) \int \left (\frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}+\frac {a^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b (b c-a d) (a+b x)}+\frac {c^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{d (-b c+a d) (c+d x)}\right ) \, dx}{b d}-\frac {\left (2 A B^2 (b c-a d) (b g-a h)^3 n^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {b c-a d}{d x}\right )}{x \left (\frac {b c-a d}{b}+\frac {d x}{b}\right )} \, dx,x,a+b x\right )}{b^4 h}+\frac {\left (2 A B^2 (b c-a d) (d g-c h)^3 n^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {-b c+a d}{b x}\right )}{x \left (\frac {-b c+a d}{d}+\frac {b x}{d}\right )} \, dx,x,c+d x\right )}{d^4 h}+\frac {\left (2 B^3 (b c-a d) (b g-a h)^3 n^3\right ) \int \frac {\text {Li}_2\left (1+\frac {b c-a d}{d (a+b x)}\right )}{(a+b x) (c+d x)} \, dx}{b^3 h}+\frac {\left (2 B^3 (b c-a d) (d g-c h)^3 n^3\right ) \int \frac {\text {Li}_2\left (1+\frac {-b c+a d}{b (c+d x)}\right )}{(a+b x) (c+d x)} \, dx}{d^3 h}+\frac {\left (2 B^3 (b c-a d)^3 h (3 b d g-b c h-a d h) n^3\right ) \int \frac {\log \left (-\frac {-b c+a d}{b (c+d x)}\right )}{(a+b x) (c+d x)} \, dx}{b^3 d^3}\\ &=-\frac {A^2 B (b c-a d) h (3 b d g-b c h-a d h) n x}{b^2 d^2}+\frac {A B^2 (b c-a d)^2 h^2 n^2 x}{b^2 d^2}-\frac {A^2 B (b c-a d) h^2 n x^2}{2 b d}+\frac {A^3 (g+h x)^3}{3 h}-\frac {A^2 B (b g-a h)^3 n \log (a+b x)}{b^3 h}+\frac {a^2 A B^2 (b c-a d) h^2 n^2 \log (a+b x)}{b^3 d}+\frac {A^2 B (d g-c h)^3 n \log (c+d x)}{d^3 h}-\frac {A B^2 c^2 (b c-a d) h^2 n^2 \log (c+d x)}{b d^3}+\frac {2 A B^2 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log (c+d x)}{b^3 d^3}-\frac {A B^2 (b c-a d) h^2 n x^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}-\frac {2 A B^2 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {2 A B^2 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {2 A B^2 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}-\frac {2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^3}-\frac {B^3 (b c-a d) h^2 n x^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b d}-\frac {B^3 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {B^3 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}-\frac {2 B^3 (b g-a h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}-\frac {2 B^3 (d g-c h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}-\frac {2 B^3 (b g-a h)^3 n^3 \text {Li}_3\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}+\frac {2 B^3 (d g-c h)^3 n^3 \text {Li}_3\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}-\frac {\left (B^3 c^2 (b c-a d) h^2 n^2\right ) \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{c+d x} \, dx}{b d^2}+\frac {\left (a^2 B^3 (b c-a d) h^2 n^2\right ) \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{a+b x} \, dx}{b^2 d}+\frac {\left (B^3 (b c-a d)^2 h^2 n^2\right ) \int \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx}{b^2 d^2}+\frac {\left (2 A B^2 (b c-a d) (b g-a h)^3 n^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(b c-a d) x}{d}\right )}{\left (\frac {b c-a d}{b}+\frac {d}{b x}\right ) x} \, dx,x,\frac {1}{a+b x}\right )}{b^4 h}-\frac {\left (2 A B^2 (b c-a d) (d g-c h)^3 n^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(-b c+a d) x}{b}\right )}{\left (\frac {-b c+a d}{d}+\frac {b}{d x}\right ) x} \, dx,x,\frac {1}{c+d x}\right )}{d^4 h}+\frac {\left (2 B^3 (b c-a d)^3 h (3 b d g-b c h-a d h) n^3\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {-b c+a d}{b x}\right )}{x \left (\frac {-b c+a d}{d}+\frac {b x}{d}\right )} \, dx,x,c+d x\right )}{b^3 d^4}\\ &=-\frac {A^2 B (b c-a d) h (3 b d g-b c h-a d h) n x}{b^2 d^2}+\frac {A B^2 (b c-a d)^2 h^2 n^2 x}{b^2 d^2}-\frac {A^2 B (b c-a d) h^2 n x^2}{2 b d}+\frac {A^3 (g+h x)^3}{3 h}-\frac {A^2 B (b g-a h)^3 n \log (a+b x)}{b^3 h}+\frac {a^2 A B^2 (b c-a d) h^2 n^2 \log (a+b x)}{b^3 d}+\frac {A^2 B (d g-c h)^3 n \log (c+d x)}{d^3 h}-\frac {A B^2 c^2 (b c-a d) h^2 n^2 \log (c+d x)}{b d^3}+\frac {2 A B^2 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log (c+d x)}{b^3 d^3}-\frac {A B^2 (b c-a d) h^2 n x^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}-\frac {2 A B^2 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {B^3 (b c-a d)^2 h^2 n^2 (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {2 A B^2 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {a^2 B^3 (b c-a d) h^2 n^2 \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d}-\frac {2 A B^2 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 c^2 (b c-a d) h^2 n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d^3}-\frac {2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^3}-\frac {B^3 (b c-a d) h^2 n x^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b d}-\frac {B^3 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {B^3 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}-\frac {2 B^3 (b g-a h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}-\frac {2 B^3 (d g-c h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}-\frac {2 B^3 (b g-a h)^3 n^3 \text {Li}_3\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}+\frac {2 B^3 (d g-c h)^3 n^3 \text {Li}_3\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}+\frac {\left (2 A B^2 (b c-a d) (b g-a h)^3 n^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(b c-a d) x}{d}\right )}{\frac {d}{b}+\frac {(b c-a d) x}{b}} \, dx,x,\frac {1}{a+b x}\right )}{b^4 h}-\frac {\left (2 A B^2 (b c-a d) (d g-c h)^3 n^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(-b c+a d) x}{b}\right )}{\frac {b}{d}+\frac {(-b c+a d) x}{d}} \, dx,x,\frac {1}{c+d x}\right )}{d^4 h}-\frac {\left (B^3 c^2 (b c-a d)^2 h^2 n^3\right ) \int \frac {\log \left (-\frac {-b c+a d}{b (c+d x)}\right )}{(a+b x) (c+d x)} \, dx}{b d^3}+\frac {\left (a^2 B^3 (b c-a d)^2 h^2 n^3\right ) \int \frac {\log \left (-\frac {b c-a d}{d (a+b x)}\right )}{(a+b x) (c+d x)} \, dx}{b^3 d}-\frac {\left (B^3 (b c-a d)^3 h^2 n^3\right ) \int \frac {1}{c+d x} \, dx}{b^3 d^2}-\frac {\left (2 B^3 (b c-a d)^3 h (3 b d g-b c h-a d h) n^3\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(-b c+a d) x}{b}\right )}{\left (\frac {-b c+a d}{d}+\frac {b}{d x}\right ) x} \, dx,x,\frac {1}{c+d x}\right )}{b^3 d^4}\\ &=-\frac {A^2 B (b c-a d) h (3 b d g-b c h-a d h) n x}{b^2 d^2}+\frac {A B^2 (b c-a d)^2 h^2 n^2 x}{b^2 d^2}-\frac {A^2 B (b c-a d) h^2 n x^2}{2 b d}+\frac {A^3 (g+h x)^3}{3 h}-\frac {A^2 B (b g-a h)^3 n \log (a+b x)}{b^3 h}+\frac {a^2 A B^2 (b c-a d) h^2 n^2 \log (a+b x)}{b^3 d}+\frac {A^2 B (d g-c h)^3 n \log (c+d x)}{d^3 h}-\frac {A B^2 c^2 (b c-a d) h^2 n^2 \log (c+d x)}{b d^3}+\frac {2 A B^2 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log (c+d x)}{b^3 d^3}-\frac {B^3 (b c-a d)^3 h^2 n^3 \log (c+d x)}{b^3 d^3}-\frac {A B^2 (b c-a d) h^2 n x^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}-\frac {2 A B^2 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {B^3 (b c-a d)^2 h^2 n^2 (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {2 A B^2 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {a^2 B^3 (b c-a d) h^2 n^2 \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d}-\frac {2 A B^2 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 c^2 (b c-a d) h^2 n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d^3}-\frac {2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^3}-\frac {B^3 (b c-a d) h^2 n x^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b d}-\frac {B^3 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {B^3 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}-\frac {2 A B^2 (d g-c h)^3 n^2 \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 h}-\frac {2 A B^2 (b g-a h)^3 n^2 \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 h}-\frac {2 B^3 (b g-a h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}-\frac {2 B^3 (d g-c h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}-\frac {2 B^3 (b g-a h)^3 n^3 \text {Li}_3\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}+\frac {2 B^3 (d g-c h)^3 n^3 \text {Li}_3\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}-\frac {\left (B^3 c^2 (b c-a d)^2 h^2 n^3\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {-b c+a d}{b x}\right )}{x \left (\frac {-b c+a d}{d}+\frac {b x}{d}\right )} \, dx,x,c+d x\right )}{b d^4}+\frac {\left (a^2 B^3 (b c-a d)^2 h^2 n^3\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {b c-a d}{d x}\right )}{x \left (\frac {b c-a d}{b}+\frac {d x}{b}\right )} \, dx,x,a+b x\right )}{b^4 d}-\frac {\left (2 B^3 (b c-a d)^3 h (3 b d g-b c h-a d h) n^3\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(-b c+a d) x}{b}\right )}{\frac {b}{d}+\frac {(-b c+a d) x}{d}} \, dx,x,\frac {1}{c+d x}\right )}{b^3 d^4}\\ &=-\frac {A^2 B (b c-a d) h (3 b d g-b c h-a d h) n x}{b^2 d^2}+\frac {A B^2 (b c-a d)^2 h^2 n^2 x}{b^2 d^2}-\frac {A^2 B (b c-a d) h^2 n x^2}{2 b d}+\frac {A^3 (g+h x)^3}{3 h}-\frac {A^2 B (b g-a h)^3 n \log (a+b x)}{b^3 h}+\frac {a^2 A B^2 (b c-a d) h^2 n^2 \log (a+b x)}{b^3 d}+\frac {A^2 B (d g-c h)^3 n \log (c+d x)}{d^3 h}-\frac {A B^2 c^2 (b c-a d) h^2 n^2 \log (c+d x)}{b d^3}+\frac {2 A B^2 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log (c+d x)}{b^3 d^3}-\frac {B^3 (b c-a d)^3 h^2 n^3 \log (c+d x)}{b^3 d^3}-\frac {A B^2 (b c-a d) h^2 n x^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}-\frac {2 A B^2 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {B^3 (b c-a d)^2 h^2 n^2 (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {2 A B^2 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {a^2 B^3 (b c-a d) h^2 n^2 \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d}-\frac {2 A B^2 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 c^2 (b c-a d) h^2 n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d^3}-\frac {2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^3}-\frac {B^3 (b c-a d) h^2 n x^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b d}-\frac {B^3 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {B^3 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}-\frac {2 A B^2 (d g-c h)^3 n^2 \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 h}-\frac {2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^3 \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{b^3 d^3}-\frac {2 A B^2 (b g-a h)^3 n^2 \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 h}-\frac {2 B^3 (b g-a h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}-\frac {2 B^3 (d g-c h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}-\frac {2 B^3 (b g-a h)^3 n^3 \text {Li}_3\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}+\frac {2 B^3 (d g-c h)^3 n^3 \text {Li}_3\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}+\frac {\left (B^3 c^2 (b c-a d)^2 h^2 n^3\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(-b c+a d) x}{b}\right )}{\left (\frac {-b c+a d}{d}+\frac {b}{d x}\right ) x} \, dx,x,\frac {1}{c+d x}\right )}{b d^4}-\frac {\left (a^2 B^3 (b c-a d)^2 h^2 n^3\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(b c-a d) x}{d}\right )}{\left (\frac {b c-a d}{b}+\frac {d}{b x}\right ) x} \, dx,x,\frac {1}{a+b x}\right )}{b^4 d}\\ &=-\frac {A^2 B (b c-a d) h (3 b d g-b c h-a d h) n x}{b^2 d^2}+\frac {A B^2 (b c-a d)^2 h^2 n^2 x}{b^2 d^2}-\frac {A^2 B (b c-a d) h^2 n x^2}{2 b d}+\frac {A^3 (g+h x)^3}{3 h}-\frac {A^2 B (b g-a h)^3 n \log (a+b x)}{b^3 h}+\frac {a^2 A B^2 (b c-a d) h^2 n^2 \log (a+b x)}{b^3 d}+\frac {A^2 B (d g-c h)^3 n \log (c+d x)}{d^3 h}-\frac {A B^2 c^2 (b c-a d) h^2 n^2 \log (c+d x)}{b d^3}+\frac {2 A B^2 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log (c+d x)}{b^3 d^3}-\frac {B^3 (b c-a d)^3 h^2 n^3 \log (c+d x)}{b^3 d^3}-\frac {A B^2 (b c-a d) h^2 n x^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}-\frac {2 A B^2 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {B^3 (b c-a d)^2 h^2 n^2 (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {2 A B^2 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {a^2 B^3 (b c-a d) h^2 n^2 \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d}-\frac {2 A B^2 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 c^2 (b c-a d) h^2 n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d^3}-\frac {2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^3}-\frac {B^3 (b c-a d) h^2 n x^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b d}-\frac {B^3 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {B^3 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}-\frac {2 A B^2 (d g-c h)^3 n^2 \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 h}-\frac {2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^3 \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{b^3 d^3}-\frac {2 A B^2 (b g-a h)^3 n^2 \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 h}-\frac {2 B^3 (b g-a h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}-\frac {2 B^3 (d g-c h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}-\frac {2 B^3 (b g-a h)^3 n^3 \text {Li}_3\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}+\frac {2 B^3 (d g-c h)^3 n^3 \text {Li}_3\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}+\frac {\left (B^3 c^2 (b c-a d)^2 h^2 n^3\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(-b c+a d) x}{b}\right )}{\frac {b}{d}+\frac {(-b c+a d) x}{d}} \, dx,x,\frac {1}{c+d x}\right )}{b d^4}-\frac {\left (a^2 B^3 (b c-a d)^2 h^2 n^3\right ) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(b c-a d) x}{d}\right )}{\frac {d}{b}+\frac {(b c-a d) x}{b}} \, dx,x,\frac {1}{a+b x}\right )}{b^4 d}\\ &=-\frac {A^2 B (b c-a d) h (3 b d g-b c h-a d h) n x}{b^2 d^2}+\frac {A B^2 (b c-a d)^2 h^2 n^2 x}{b^2 d^2}-\frac {A^2 B (b c-a d) h^2 n x^2}{2 b d}+\frac {A^3 (g+h x)^3}{3 h}-\frac {A^2 B (b g-a h)^3 n \log (a+b x)}{b^3 h}+\frac {a^2 A B^2 (b c-a d) h^2 n^2 \log (a+b x)}{b^3 d}+\frac {A^2 B (d g-c h)^3 n \log (c+d x)}{d^3 h}-\frac {A B^2 c^2 (b c-a d) h^2 n^2 \log (c+d x)}{b d^3}+\frac {2 A B^2 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log (c+d x)}{b^3 d^3}-\frac {B^3 (b c-a d)^3 h^2 n^3 \log (c+d x)}{b^3 d^3}-\frac {A B^2 (b c-a d) h^2 n x^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d}-\frac {2 A B^2 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {B^3 (b c-a d)^2 h^2 n^2 (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A^2 B (g+h x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {2 A B^2 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {a^2 B^3 (b c-a d) h^2 n^2 \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d}-\frac {2 A B^2 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 c^2 (b c-a d) h^2 n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b d^3}-\frac {2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^3}-\frac {B^3 (b c-a d) h^2 n x^2 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b d}-\frac {B^3 (b c-a d) h (3 b d g-b c h-a d h) n (a+b x) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 d^2}+\frac {A B^2 (g+h x)^3 \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{h}+\frac {B^3 (b g-a h)^3 n \log \left (-\frac {b c-a d}{d (a+b x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{b^3 h}-\frac {B^3 (d g-c h)^3 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \log ^2\left (e (a+b x)^n (c+d x)^{-n}\right )}{d^3 h}+\frac {B^3 (g+h x)^3 \log ^3\left (e (a+b x)^n (c+d x)^{-n}\right )}{3 h}-\frac {2 A B^2 (d g-c h)^3 n^2 \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 h}+\frac {B^3 c^2 (b c-a d) h^2 n^3 \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{b d^3}-\frac {2 B^3 (b c-a d)^2 h (3 b d g-b c h-a d h) n^3 \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{b^3 d^3}-\frac {2 A B^2 (b g-a h)^3 n^2 \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 h}+\frac {a^2 B^3 (b c-a d) h^2 n^3 \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 d}-\frac {2 B^3 (b g-a h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}-\frac {2 B^3 (d g-c h)^3 n^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \text {Li}_2\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}-\frac {2 B^3 (b g-a h)^3 n^3 \text {Li}_3\left (1+\frac {b c-a d}{d (a+b x)}\right )}{b^3 h}+\frac {2 B^3 (d g-c h)^3 n^3 \text {Li}_3\left (1-\frac {b c-a d}{b (c+d x)}\right )}{d^3 h}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]  time = 6.02, size = 0, normalized size = 0.00 \[ \int (g+h x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3 \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[(g + h*x)^2*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^3,x]

[Out]

Integrate[(g + h*x)^2*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^3, x]

________________________________________________________________________________________

fricas [F]  time = 0.79, size = 0, normalized size = 0.00 \[ {\rm integral}\left (A^{3} h^{2} x^{2} + 2 \, A^{3} g h x + A^{3} g^{2} + {\left (B^{3} h^{2} x^{2} + 2 \, B^{3} g h x + B^{3} g^{2}\right )} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )^{3} + 3 \, {\left (A B^{2} h^{2} x^{2} + 2 \, A B^{2} g h x + A B^{2} g^{2}\right )} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )^{2} + 3 \, {\left (A^{2} B h^{2} x^{2} + 2 \, A^{2} B g h x + A^{2} B g^{2}\right )} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ), x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2*(A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^3,x, algorithm="fricas")

[Out]

integral(A^3*h^2*x^2 + 2*A^3*g*h*x + A^3*g^2 + (B^3*h^2*x^2 + 2*B^3*g*h*x + B^3*g^2)*log((b*x + a)^n*e/(d*x +
c)^n)^3 + 3*(A*B^2*h^2*x^2 + 2*A*B^2*g*h*x + A*B^2*g^2)*log((b*x + a)^n*e/(d*x + c)^n)^2 + 3*(A^2*B*h^2*x^2 +
2*A^2*B*g*h*x + A^2*B*g^2)*log((b*x + a)^n*e/(d*x + c)^n), x)

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2*(A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^3,x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [F]  time = 8.29, size = 0, normalized size = 0.00 \[ \int \left (h x +g \right )^{2} \left (B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )+A \right )^{3}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)^2*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^3,x)

[Out]

int((h*x+g)^2*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^3,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2*(A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^3,x, algorithm="maxima")

[Out]

A^2*B*h^2*x^3*log((b*x + a)^n*e/(d*x + c)^n) + 1/3*A^3*h^2*x^3 + 3*A^2*B*g*h*x^2*log((b*x + a)^n*e/(d*x + c)^n
) + A^3*g*h*x^2 + 3*A^2*B*g^2*x*log((b*x + a)^n*e/(d*x + c)^n) + A^3*g^2*x + 3*(a*e*n*log(b*x + a)/b - c*e*n*l
og(d*x + c)/d)*A^2*B*g^2/e - 3*(a^2*e*n*log(b*x + a)/b^2 - c^2*e*n*log(d*x + c)/d^2 + (b*c*e*n - a*d*e*n)*x/(b
*d))*A^2*B*g*h/e + 1/2*(2*a^3*e*n*log(b*x + a)/b^3 - 2*c^3*e*n*log(d*x + c)/d^3 - ((b^2*c*d*e*n - a*b*d^2*e*n)
*x^2 - 2*(b^2*c^2*e*n - a^2*d^2*e*n)*x)/(b^2*d^2))*A^2*B*h^2/e - 1/6*(2*(B^3*b^3*d^3*h^2*x^3 + 3*B^3*b^3*d^3*g
*h*x^2 + 3*B^3*b^3*d^3*g^2*x)*log((d*x + c)^n)^3 + 3*(2*(3*c*d^2*g^2*n - 3*c^2*d*g*h*n + c^3*h^2*n)*B^3*b^3*lo
g(d*x + c) - 2*(3*a*b^2*d^3*g^2*n - 3*a^2*b*d^3*g*h*n + a^3*d^3*h^2*n)*B^3*log(b*x + a) - 2*(B^3*b^3*d^3*h^2*l
og(e) + A*B^2*b^3*d^3*h^2)*x^3 - (6*A*B^2*b^3*d^3*g*h + (a*b^2*d^3*h^2*n - (c*d^2*h^2*n - 6*d^3*g*h*log(e))*b^
3)*B^3)*x^2 - 2*(3*A*B^2*b^3*d^3*g^2 + (3*a*b^2*d^3*g*h*n - a^2*b*d^3*h^2*n - (3*c*d^2*g*h*n - c^2*d*h^2*n - 3
*d^3*g^2*log(e))*b^3)*B^3)*x - 2*(B^3*b^3*d^3*h^2*x^3 + 3*B^3*b^3*d^3*g*h*x^2 + 3*B^3*b^3*d^3*g^2*x)*log((b*x
+ a)^n))*log((d*x + c)^n)^2)/(b^3*d^3) - integrate(-(B^3*b^3*c*d^2*g^2*log(e)^3 + 3*A*B^2*b^3*c*d^2*g^2*log(e)
^2 + (B^3*b^3*d^3*h^2*log(e)^3 + 3*A*B^2*b^3*d^3*h^2*log(e)^2)*x^3 + (B^3*b^3*d^3*h^2*x^3 + B^3*b^3*c*d^2*g^2
+ (2*d^3*g*h + c*d^2*h^2)*B^3*b^3*x^2 + (d^3*g^2 + 2*c*d^2*g*h)*B^3*b^3*x)*log((b*x + a)^n)^3 + (3*(2*d^3*g*h*
log(e)^2 + c*d^2*h^2*log(e)^2)*A*B^2*b^3 + (2*d^3*g*h*log(e)^3 + c*d^2*h^2*log(e)^3)*B^3*b^3)*x^2 + 3*(B^3*b^3
*c*d^2*g^2*log(e) + A*B^2*b^3*c*d^2*g^2 + (B^3*b^3*d^3*h^2*log(e) + A*B^2*b^3*d^3*h^2)*x^3 + ((2*d^3*g*h + c*d
^2*h^2)*A*B^2*b^3 + (2*d^3*g*h*log(e) + c*d^2*h^2*log(e))*B^3*b^3)*x^2 + ((d^3*g^2 + 2*c*d^2*g*h)*A*B^2*b^3 +
(d^3*g^2*log(e) + 2*c*d^2*g*h*log(e))*B^3*b^3)*x)*log((b*x + a)^n)^2 + (3*(d^3*g^2*log(e)^2 + 2*c*d^2*g*h*log(
e)^2)*A*B^2*b^3 + (d^3*g^2*log(e)^3 + 2*c*d^2*g*h*log(e)^3)*B^3*b^3)*x + 3*(B^3*b^3*c*d^2*g^2*log(e)^2 + 2*A*B
^2*b^3*c*d^2*g^2*log(e) + (B^3*b^3*d^3*h^2*log(e)^2 + 2*A*B^2*b^3*d^3*h^2*log(e))*x^3 + (2*(2*d^3*g*h*log(e) +
 c*d^2*h^2*log(e))*A*B^2*b^3 + (2*d^3*g*h*log(e)^2 + c*d^2*h^2*log(e)^2)*B^3*b^3)*x^2 + (2*(d^3*g^2*log(e) + 2
*c*d^2*g*h*log(e))*A*B^2*b^3 + (d^3*g^2*log(e)^2 + 2*c*d^2*g*h*log(e)^2)*B^3*b^3)*x)*log((b*x + a)^n) - (3*B^3
*b^3*c*d^2*g^2*log(e)^2 + 6*A*B^2*b^3*c*d^2*g^2*log(e) - 2*(3*c*d^2*g^2*n^2 - 3*c^2*d*g*h*n^2 + c^3*h^2*n^2)*B
^3*b^3*log(d*x + c) + 2*(3*a*b^2*d^3*g^2*n^2 - 3*a^2*b*d^3*g*h*n^2 + a^3*d^3*h^2*n^2)*B^3*log(b*x + a) + (2*(h
^2*n + 3*h^2*log(e))*A*B^2*b^3*d^3 + (2*h^2*n*log(e) + 3*h^2*log(e)^2)*B^3*b^3*d^3)*x^3 + (6*(c*d^2*h^2*log(e)
 + (g*h*n + 2*g*h*log(e))*d^3)*A*B^2*b^3 + (a*b^2*d^3*h^2*n^2 - ((h^2*n^2 - 3*h^2*log(e)^2)*c*d^2 - 6*(g*h*n*l
og(e) + g*h*log(e)^2)*d^3)*b^3)*B^3)*x^2 + 3*(B^3*b^3*d^3*h^2*x^3 + B^3*b^3*c*d^2*g^2 + (2*d^3*g*h + c*d^2*h^2
)*B^3*b^3*x^2 + (d^3*g^2 + 2*c*d^2*g*h)*B^3*b^3*x)*log((b*x + a)^n)^2 + (6*(2*c*d^2*g*h*log(e) + (g^2*n + g^2*
log(e))*d^3)*A*B^2*b^3 + (6*a*b^2*d^3*g*h*n^2 - 2*a^2*b*d^3*h^2*n^2 + (2*c^2*d*h^2*n^2 - 6*(g*h*n^2 - g*h*log(
e)^2)*c*d^2 + 3*(2*g^2*n*log(e) + g^2*log(e)^2)*d^3)*b^3)*B^3)*x + 2*(3*B^3*b^3*c*d^2*g^2*log(e) + 3*A*B^2*b^3
*c*d^2*g^2 + (3*A*B^2*b^3*d^3*h^2 + (h^2*n + 3*h^2*log(e))*B^3*b^3*d^3)*x^3 + 3*((2*d^3*g*h + c*d^2*h^2)*A*B^2
*b^3 + (c*d^2*h^2*log(e) + (g*h*n + 2*g*h*log(e))*d^3)*B^3*b^3)*x^2 + 3*((d^3*g^2 + 2*c*d^2*g*h)*A*B^2*b^3 + (
2*c*d^2*g*h*log(e) + (g^2*n + g^2*log(e))*d^3)*B^3*b^3)*x)*log((b*x + a)^n))*log((d*x + c)^n))/(b^3*d^3*x + b^
3*c*d^2), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (g+h\,x\right )}^2\,{\left (A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\right )}^3 \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g + h*x)^2*(A + B*log((e*(a + b*x)^n)/(c + d*x)^n))^3,x)

[Out]

int((g + h*x)^2*(A + B*log((e*(a + b*x)^n)/(c + d*x)^n))^3, x)

________________________________________________________________________________________

sympy [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: HeuristicGCDFailed} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)**2*(A+B*ln(e*(b*x+a)**n/((d*x+c)**n)))**3,x)

[Out]

Exception raised: HeuristicGCDFailed

________________________________________________________________________________________